
var Nrgut_Str_Main = new Class({
	
	Extends: Nrg_Ut_TestCase,
	
	//--------------------------------------------------------------------------
	//--------------------------------------------------------------------------
	
	testCutFromBeg: function()
	{
		var test_str = '123_123_123_foo_bar_123_';
		
		this.assertEquals(
			test_str.cutFromBeg('123_', true),
			'foo_bar_123_'
		);
		
		this.assertEquals(
			test_str.cutFromBeg('123_', false),
			'123_123_foo_bar_123_'
		);
		
		this.assertEquals(
			test_str.cutFromBeg('123_'),
			'foo_bar_123_'
		);
	},
	
	//--------------------------------------------------------------------------

	testCutFromEnd: function()
	{
		var test_str = '123_foo_bar_123_123_123_';
		
		this.assertEquals(
			test_str.cutFromEnd('123_'),
			'123_foo_bar_'
		);
		
		this.assertEquals(
			test_str.cutFromEnd('123_', false),
			'123_foo_bar_123_123_'
		);
	},
	
	//--------------------------------------------------------------------------
	
	testCutFromBoth: function()
	{
		var test_str = '123_123_123_foo_bar_123_123_123_';
		
		this.assertEquals(
			test_str.cutFromBoth('123_'),
			'foo_bar_'
		);
		
		this.assertEquals(
			test_str.cutFromBoth('123_', false),
			'123_123_foo_bar_123_123_'
		);
	},
	
	//--------------------------------------------------------------------------
	
	testRepeat: function()
	{
		this.assertEquals( '2'.repeat(2), '22' );
		this.assertEquals( '3'.repeat(3), '333' );
		this.assertEquals( '400'.repeat(4), '400400400400' );
	}
	
	//--------------------------------------------------------------------------
	
});